package com.bnz.rocketmq.config;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(topic = "sms",consumerGroup = "Rocketmq-listener")
public class MyRocketMQListener implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        System.out.println("对方发送消息说：" + s);
    }
}
